package ace.module.stock.core.impl.manager;

import ace.module.common.core.impl.manager.EntityOfAppManager;
import ace.module.stock.api.model.dto.WmsSalesQuantityDto;
import ace.module.stock.api.model.input.WmsBizInitInput;
import ace.module.stock.api.model.input.WmsBizParentIdInput;
import ace.module.stock.api.model.input.WmsBizUniqueIdInput;
import ace.module.stock.core.impl.dao.entity.WmsApplication;
import ace.module.stock.core.impl.dao.entity.WmsSalesQuantity;
import ace.module.stock.core.impl.dao.model.bo.WmsSalesQuantityDetailSaveContextBo;
import java.util.List;

/**
 * 销售数量 spring data jdbc querydsl rsql manager.
 *
 * @author Caspar
 */
public interface WmsSalesQuantityManager extends EntityOfAppManager<WmsSalesQuantity, Long, WmsSalesQuantityDto> {


  void initOrNone(WmsApplication wmsApplication, WmsBizInitInput input);

  List<WmsSalesQuantity> getListByWmsAppIdAndBizUniqueIdIn(Long wmsAppId, List<WmsBizUniqueIdInput> bizUniqueIdInputs);

  List<WmsSalesQuantityDto> getDtoListByWmsAppIdAndBizUniqueIdIn(Long wmsAppId, List<WmsBizUniqueIdInput> bizUniqueIdInputs);

  WmsSalesQuantityDto findDtoByBizUniqueId(List<WmsSalesQuantityDto> wmsSalesQuantityDtos, WmsBizUniqueIdInput bizUniqueIdInput);

  WmsSalesQuantityDetailSaveContextBo assembleInitOrNoneSaveListContext(WmsApplication wmsApplication, WmsBizInitInput wmsBizInitInput);

  List<WmsSalesQuantity> getSkuAndAllRecursionParentsByWmsAppIdAndObjectIdIn(Long wmsAppId, List<Long> objectIds);

  List<WmsSalesQuantity> getListByWmsAppIdAndBizParentId(Long wmsAppId, WmsBizParentIdInput wmsBizParentIdInput);

  List<WmsSalesQuantityDto> getDtoListByWmsAppIdAndBizParentId(Long wmsAppId, WmsBizParentIdInput wmsBizParentIdInput);

  void checkNotContainsAllByObjectId(List<WmsSalesQuantity> skuAndAllRecursionParents, List<Long> skuObjectIdInputs);
}